export const dialogProps = {
    visible: {
        type: Boolean,
        default: false,
    },
    // 是否显示关闭按钮	
    showClose:{
        type: Boolean,
        default: true,
    },
    showFooter:{
        type: Boolean,
        default: true,
    },
    okText: {
        type: String,
        default:'确定'
    },
    mask:{
        type: Boolean,
        default: true, //是否需要遮罩
    },
    maskClosable:{
        type: Boolean,
        default: true,
    },
    footerButtonAlign: {
        type: String,
        default: 'right',
    },
    showFooterLine:{
        type: Boolean,
        default: true,
    },
    confirmLoading:{
        type: Boolean,
        default: false,
    },
    cancelText: {
        type: String,
        default:'取消'
    },
    lockScroll: {
        type: Boolean,
        default: true,
    },
    fullscreen: {
        type: Boolean,
        default: false,
    },
    // 是否支出拖拽
    draggable: {
        type: Boolean,
        default: true,
    },
    width: {
        type: [Number, String] as PropType<number | string>,
        default:520
    },
    height: {
        type: [Number, String] as PropType<number | string>,
    },
    maxHeight: {
        type: [Number, String] as PropType<number | string>,
        default:'calc(100% - 50px)'
    },
    appendToBody: {
        type: Boolean,
        default: true,
    },
    title: String,
    content:String,
    destroyOnClose:Boolean,
    titleAlign: {
        type: String,
        default: 'left',
    },
    onCancel: {
        type: Function,
    }, 
    onConfirm: {
        type: Function,
    }, 
    // 关闭前的回调
    beforeClose: {
        type: Function as PropType<(done: () => void) => void>,
    },
}

// export type EmitName = 'update:modelValue' | 'close';

export const dialogEmits = [
    'update:visible',
    'open',
    'on-close',
    'on-confirm',
    'on-cancel'
]

export type DialogProps = ExtractPropTypes<typeof dialogProps>;